﻿namespace WinForms
{
    using PublicStaticClass;
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Net;
    using System.Net.NetworkInformation;
    using System.Runtime.InteropServices;
    using System.Text;
    using System.Windows.Forms;
    using WinForms.Properties;

    public class FrmIdeaAndAdvice : Form
    {
        private Button btn_Close;
        private Button btn_Saves;
        private IContainer components = null;
        private FrmPrompt frmPrompt = null;
        public const int HTCAPTION = 2;
        public static string KeyPath;
        private Label label1;
        private Label label2;
        private Label label3;
        private Label lbl_BiTian;
        private Label lbl_Titles;
        private Label lblTitle;
        private Panel pan_AllPanel;
        private Panel pan_AllPlanes;
        private Panel pan_Bottoms;
        private Panel pan_Dock;
        private Panel pan_DockBottom;
        private Panel pan_DockLeft;
        private Panel pan_DockRight;
        private Panel pan_Lefts;
        private Panel pan_Rights;
        private Panel pan_td0;
        private Panel pan_td3;
        private Panel pan_Top;
        private Panel pan_TopLeft;
        private Panel pan_TopRight;
        private Panel pan_ZhongJian;
        private Panel pane_TopT;
        private Panel panel_BiTian;
        private Panel panel_Button;
        private Panel panel1;
        private Panel panel10;
        private Panel panel2;
        private Panel panel3;
        private Panel panel4;
        private Panel panel5;
        private Panel panel6;
        private Panel panel7;
        private Panel panel8;
        private Panel panel9;
        public const int SC_MOVE = 0xf010;
        private TextBox txt_Infos;
        private TextBox txt_LinkMan;
        private TextBox txt_Tel;
        private TextBox txt_Titles;
        public const int WM_SYSCOMMAND = 0x112;

        public FrmIdeaAndAdvice()
        {
            this.InitializeComponent();
        }

        private void btn_Close_Click(object sender, EventArgs e)
        {
            base.Close();
        }

        private void btn_Saves_Click(object sender, EventArgs e)
        {
            string str = "";
            if (this.txt_Titles.Text == "")
            {
                this.frmPrompt = new FrmPrompt(false, "请您输入标题!");
                this.frmPrompt.ShowDialog();
            }
            else if (this.txt_Infos.Text == "")
            {
                this.frmPrompt = new FrmPrompt(false, "请您输入内容!");
                this.frmPrompt.ShowDialog();
            }
            else
            {
                StringBuilder builder = new StringBuilder();
                builder.Append(this.txt_Titles.Text + ",");
                builder.Append(this.txt_Infos.Text + ",");
                builder.Append(this.txt_LinkMan.Text + ",");
                builder.Append(this.txt_Tel.Text + ",");
                string source = this.getKeyInfo();
                if (source != "")
                {
                    Rijndael rijndael = new Rijndael("kkkkkejiosjadafkjiefj@!#!@#!@3");
                    string[] strArray = rijndael.Decrypt(source).Split(new char[] { '|' });
                    if (strArray.Length > 0)
                    {
                        str = strArray[4];
                    }
                    builder.Append(strArray[0] + "|_|" + strArray[1] + ",");
                    builder.Append(str);
                    object[] args = new object[] { builder.ToString() };
                    string wsUrl = "http://www.teaxt.com/SaveErrorMessage.asmx";
                    object obj2 = GetMyServices.InvokeWebService(wsUrl, "newNewErrorMessage", args);
                    this.frmPrompt = new FrmPrompt(true, obj2.ToString());
                    this.frmPrompt.ShowDialog();
                }
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        [DllImport("SYUNEW3D.dll")]
        public static extern int FindPort(int start, StringBuilder OutKeyPath);
        [DllImport("SYUNEW3D.dll")]
        public static extern int FindPort_2(int start, int in_data, int verf_data, StringBuilder OutKeyPath);
        private void FrmIdeaAndAdvice_Load(object sender, EventArgs e)
        {
            string ipByHostName = this.GetIpByHostName("http://www.teaxt.com");
            if (this.Ping(ipByHostName))
            {
                MessageBox.Show("网络无法正常连接", "提示", MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
        }

        public string GetIpByHostName(string hostName)
        {
            hostName = hostName.Trim();
            if (hostName == string.Empty)
            {
                return string.Empty;
            }
            try
            {
                return Dns.GetHostEntry(hostName).AddressList.GetValue(0).ToString();
            }
            catch (Exception)
            {
                return string.Empty;
            }
        }

        private string getKeyInfo()
        {
            StringBuilder outKeyPath = new StringBuilder("", 0x100);
            if (FindPort(0, outKeyPath) != 0)
            {
                return "";
            }
            KeyPath = outKeyPath.ToString();
            byte[] outData = new byte[1];
            int num = YReadEx(outData, 0, 1, "FFFFFFFF", "FFFFFFFF", KeyPath);
            short capacity = outData[0];
            StringBuilder outstring = new StringBuilder("", capacity);
            for (int i = 0; i < capacity; i++)
            {
                outstring.Append(0);
            }
            YReadString(outstring, 1, capacity, "FFFFFFFF", "FFFFFFFF", KeyPath);
            return outstring.ToString();
        }

        [DllImport("SYUNEW3D.dll")]
        public static extern int GetLen(string InString);
        private void InitializeComponent()
        {
            this.pan_DockLeft = new Panel();
            this.pan_Dock = new Panel();
            this.pan_AllPanel = new Panel();
            this.pan_AllPlanes = new Panel();
            this.panel1 = new Panel();
            this.panel8 = new Panel();
            this.txt_Tel = new TextBox();
            this.panel10 = new Panel();
            this.label3 = new Label();
            this.panel7 = new Panel();
            this.txt_LinkMan = new TextBox();
            this.panel4 = new Panel();
            this.label2 = new Label();
            this.panel2 = new Panel();
            this.panel6 = new Panel();
            this.txt_Infos = new TextBox();
            this.panel3 = new Panel();
            this.label1 = new Label();
            this.pan_td3 = new Panel();
            this.panel5 = new Panel();
            this.txt_Titles = new TextBox();
            this.pan_td0 = new Panel();
            this.lbl_Titles = new Label();
            this.panel_BiTian = new Panel();
            this.lbl_BiTian = new Label();
            this.panel_Button = new Panel();
            this.btn_Saves = new Button();
            this.btn_Close = new Button();
            this.panel9 = new Panel();
            this.pan_Rights = new Panel();
            this.pan_Lefts = new Panel();
            this.pan_Bottoms = new Panel();
            this.pane_TopT = new Panel();
            this.pan_DockBottom = new Panel();
            this.pan_DockRight = new Panel();
            this.pan_Top = new Panel();
            this.pan_ZhongJian = new Panel();
            this.lblTitle = new Label();
            this.pan_TopRight = new Panel();
            this.pan_TopLeft = new Panel();
            this.pan_Dock.SuspendLayout();
            this.pan_AllPanel.SuspendLayout();
            this.pan_AllPlanes.SuspendLayout();
            this.panel1.SuspendLayout();
            this.panel8.SuspendLayout();
            this.panel10.SuspendLayout();
            this.panel7.SuspendLayout();
            this.panel4.SuspendLayout();
            this.panel2.SuspendLayout();
            this.panel6.SuspendLayout();
            this.panel3.SuspendLayout();
            this.pan_td3.SuspendLayout();
            this.panel5.SuspendLayout();
            this.pan_td0.SuspendLayout();
            this.panel_BiTian.SuspendLayout();
            this.panel_Button.SuspendLayout();
            this.pan_Top.SuspendLayout();
            this.pan_ZhongJian.SuspendLayout();
            base.SuspendLayout();
            this.pan_DockLeft.BackColor = Color.FromArgb(0xaf, 0xbf, 190);
            this.pan_DockLeft.Dock = DockStyle.Left;
            this.pan_DockLeft.Location = new Point(0, 0);
            this.pan_DockLeft.Name = "pan_DockLeft";
            this.pan_DockLeft.Size = new Size(1, 0x109);
            this.pan_DockLeft.TabIndex = 0;
            this.pan_Dock.BackColor = Color.FromArgb(0, 0, 15, 0xff);
            this.pan_Dock.Controls.Add(this.pan_AllPanel);
            this.pan_Dock.Controls.Add(this.pan_DockBottom);
            this.pan_Dock.Controls.Add(this.pan_DockRight);
            this.pan_Dock.Controls.Add(this.pan_DockLeft);
            this.pan_Dock.Dock = DockStyle.Fill;
            this.pan_Dock.Location = new Point(0, 0x20);
            this.pan_Dock.Name = "pan_Dock";
            this.pan_Dock.Size = new Size(0x248, 0x109);
            this.pan_Dock.TabIndex = 5;
            this.pan_AllPanel.BackColor = Color.White;
            this.pan_AllPanel.Controls.Add(this.pan_AllPlanes);
            this.pan_AllPanel.Controls.Add(this.pan_Rights);
            this.pan_AllPanel.Controls.Add(this.pan_Lefts);
            this.pan_AllPanel.Controls.Add(this.pan_Bottoms);
            this.pan_AllPanel.Controls.Add(this.pane_TopT);
            this.pan_AllPanel.Dock = DockStyle.Fill;
            this.pan_AllPanel.Location = new Point(1, 0);
            this.pan_AllPanel.Name = "pan_AllPanel";
            this.pan_AllPanel.Size = new Size(0x246, 0x108);
            this.pan_AllPanel.TabIndex = 3;
            this.pan_AllPlanes.Controls.Add(this.panel1);
            this.pan_AllPlanes.Controls.Add(this.panel2);
            this.pan_AllPlanes.Controls.Add(this.pan_td3);
            this.pan_AllPlanes.Controls.Add(this.panel_BiTian);
            this.pan_AllPlanes.Controls.Add(this.panel_Button);
            this.pan_AllPlanes.Controls.Add(this.panel9);
            this.pan_AllPlanes.Dock = DockStyle.Fill;
            this.pan_AllPlanes.Location = new Point(10, 10);
            this.pan_AllPlanes.Name = "pan_AllPlanes";
            this.pan_AllPlanes.Size = new Size(0x232, 0xf4);
            this.pan_AllPlanes.TabIndex = 4;
            this.panel1.Controls.Add(this.panel8);
            this.panel1.Controls.Add(this.panel10);
            this.panel1.Controls.Add(this.panel7);
            this.panel1.Controls.Add(this.panel4);
            this.panel1.Dock = DockStyle.Top;
            this.panel1.Location = new Point(0, 0xa4);
            this.panel1.Name = "panel1";
            this.panel1.Size = new Size(0x232, 0x19);
            this.panel1.TabIndex = 0x10;
            this.panel8.Controls.Add(this.txt_Tel);
            this.panel8.Dock = DockStyle.Fill;
            this.panel8.Location = new Point(0x17e, 0);
            this.panel8.Name = "panel8";
            this.panel8.Size = new Size(180, 0x19);
            this.panel8.TabIndex = 7;
            this.txt_Tel.Location = new Point(6, 2);
            this.txt_Tel.Name = "txt_Tel";
            this.txt_Tel.Size = new Size(0xa8, 0x15);
            this.txt_Tel.TabIndex = 1;
            this.panel10.Controls.Add(this.label3);
            this.panel10.Dock = DockStyle.Left;
            this.panel10.Location = new Point(0x11a, 0);
            this.panel10.Name = "panel10";
            this.panel10.Size = new Size(100, 0x19);
            this.panel10.TabIndex = 6;
            this.label3.Location = new Point(0x1b, 6);
            this.label3.Name = "label3";
            this.label3.Size = new Size(0x42, 12);
            this.label3.TabIndex = 0;
            this.label3.Text = "联系电话:";
            this.label3.TextAlign = ContentAlignment.MiddleRight;
            this.panel7.Controls.Add(this.txt_LinkMan);
            this.panel7.Dock = DockStyle.Left;
            this.panel7.Location = new Point(0x66, 0);
            this.panel7.Name = "panel7";
            this.panel7.Size = new Size(180, 0x19);
            this.panel7.TabIndex = 5;
            this.txt_LinkMan.Location = new Point(6, 2);
            this.txt_LinkMan.Name = "txt_LinkMan";
            this.txt_LinkMan.Size = new Size(0xa9, 0x15);
            this.txt_LinkMan.TabIndex = 0;
            this.panel4.Controls.Add(this.label2);
            this.panel4.Dock = DockStyle.Left;
            this.panel4.Location = new Point(0, 0);
            this.panel4.Name = "panel4";
            this.panel4.Size = new Size(0x66, 0x19);
            this.panel4.TabIndex = 4;
            this.label2.Location = new Point(12, 6);
            this.label2.Name = "label2";
            this.label2.Size = new Size(0x54, 12);
            this.label2.TabIndex = 0;
            this.label2.Text = "联系人:";
            this.label2.TextAlign = ContentAlignment.MiddleRight;
            this.panel2.Controls.Add(this.panel6);
            this.panel2.Controls.Add(this.panel3);
            this.panel2.Dock = DockStyle.Top;
            this.panel2.Location = new Point(0, 50);
            this.panel2.Name = "panel2";
            this.panel2.Size = new Size(0x232, 0x72);
            this.panel2.TabIndex = 15;
            this.panel2.Paint += new PaintEventHandler(this.panel2_Paint);
            this.panel6.Controls.Add(this.txt_Infos);
            this.panel6.Dock = DockStyle.Fill;
            this.panel6.Location = new Point(0x66, 0);
            this.panel6.Name = "panel6";
            this.panel6.Size = new Size(460, 0x72);
            this.panel6.TabIndex = 5;
            this.txt_Infos.Location = new Point(5, 3);
            this.txt_Infos.Multiline = true;
            this.txt_Infos.Name = "txt_Infos";
            this.txt_Infos.Size = new Size(0x1c1, 0x6c);
            this.txt_Infos.TabIndex = 7;
            this.panel3.Controls.Add(this.label1);
            this.panel3.Dock = DockStyle.Left;
            this.panel3.Location = new Point(0, 0);
            this.panel3.Name = "panel3";
            this.panel3.Size = new Size(0x66, 0x72);
            this.panel3.TabIndex = 4;
            this.panel3.Paint += new PaintEventHandler(this.panel3_Paint);
            this.label1.Location = new Point(10, 0x33);
            this.label1.Name = "label1";
            this.label1.Size = new Size(0x54, 12);
            this.label1.TabIndex = 0;
            this.label1.Text = "问题或建议:";
            this.label1.TextAlign = ContentAlignment.MiddleRight;
            this.pan_td3.Controls.Add(this.panel5);
            this.pan_td3.Controls.Add(this.pan_td0);
            this.pan_td3.Dock = DockStyle.Top;
            this.pan_td3.Location = new Point(0, 0x19);
            this.pan_td3.Name = "pan_td3";
            this.pan_td3.Size = new Size(0x232, 0x19);
            this.pan_td3.TabIndex = 14;
            this.pan_td3.Paint += new PaintEventHandler(this.pan_td3_Paint);
            this.panel5.Controls.Add(this.txt_Titles);
            this.panel5.Dock = DockStyle.Fill;
            this.panel5.Location = new Point(0x66, 0);
            this.panel5.Name = "panel5";
            this.panel5.Size = new Size(460, 0x19);
            this.panel5.TabIndex = 5;
            this.txt_Titles.Location = new Point(5, 2);
            this.txt_Titles.Name = "txt_Titles";
            this.txt_Titles.Size = new Size(0x1c1, 0x15);
            this.txt_Titles.TabIndex = 6;
            this.pan_td0.Controls.Add(this.lbl_Titles);
            this.pan_td0.Dock = DockStyle.Left;
            this.pan_td0.Location = new Point(0, 0);
            this.pan_td0.Name = "pan_td0";
            this.pan_td0.Size = new Size(0x66, 0x19);
            this.pan_td0.TabIndex = 4;
            this.pan_td0.Paint += new PaintEventHandler(this.pan_td0_Paint);
            this.lbl_Titles.Location = new Point(0x17, 6);
            this.lbl_Titles.Name = "lbl_Titles";
            this.lbl_Titles.Size = new Size(0x47, 12);
            this.lbl_Titles.TabIndex = 0;
            this.lbl_Titles.Text = "标题:";
            this.lbl_Titles.TextAlign = ContentAlignment.MiddleRight;
            this.panel_BiTian.Controls.Add(this.lbl_BiTian);
            this.panel_BiTian.Dock = DockStyle.Top;
            this.panel_BiTian.Location = new Point(0, 0);
            this.panel_BiTian.Name = "panel_BiTian";
            this.panel_BiTian.Size = new Size(0x232, 0x19);
            this.panel_BiTian.TabIndex = 13;
            this.panel_BiTian.Paint += new PaintEventHandler(this.panel_BiTian_Paint);
            this.lbl_BiTian.AutoSize = true;
            this.lbl_BiTian.Location = new Point(10, 6);
            this.lbl_BiTian.Name = "lbl_BiTian";
            this.lbl_BiTian.Size = new Size(0x35, 12);
            this.lbl_BiTian.TabIndex = 0;
            this.lbl_BiTian.Text = "基本信息";
            this.panel_Button.Controls.Add(this.btn_Saves);
            this.panel_Button.Controls.Add(this.btn_Close);
            this.panel_Button.Dock = DockStyle.Bottom;
            this.panel_Button.Location = new Point(0, 0xc4);
            this.panel_Button.Name = "panel_Button";
            this.panel_Button.Size = new Size(0x232, 0x2b);
            this.panel_Button.TabIndex = 11;
            this.btn_Saves.Location = new Point(170, 10);
            this.btn_Saves.Name = "btn_Saves";
            this.btn_Saves.Size = new Size(0x4b, 0x17);
            this.btn_Saves.TabIndex = 7;
            this.btn_Saves.Text = "提 交";
            this.btn_Saves.UseVisualStyleBackColor = true;
            this.btn_Saves.Click += new EventHandler(this.btn_Saves_Click);
            this.btn_Close.Location = new Point(0x13e, 10);
            this.btn_Close.Name = "btn_Close";
            this.btn_Close.Size = new Size(0x4b, 0x17);
            this.btn_Close.TabIndex = 6;
            this.btn_Close.Text = "关 闭";
            this.btn_Close.UseVisualStyleBackColor = true;
            this.btn_Close.Click += new EventHandler(this.btn_Close_Click);
            this.panel9.Dock = DockStyle.Bottom;
            this.panel9.Location = new Point(0, 0xef);
            this.panel9.Name = "panel9";
            this.panel9.Size = new Size(0x232, 5);
            this.panel9.TabIndex = 3;
            this.pan_Rights.Dock = DockStyle.Right;
            this.pan_Rights.Location = new Point(0x23c, 10);
            this.pan_Rights.Name = "pan_Rights";
            this.pan_Rights.Size = new Size(10, 0xf4);
            this.pan_Rights.TabIndex = 3;
            this.pan_Lefts.Dock = DockStyle.Left;
            this.pan_Lefts.Location = new Point(0, 10);
            this.pan_Lefts.Name = "pan_Lefts";
            this.pan_Lefts.Size = new Size(10, 0xf4);
            this.pan_Lefts.TabIndex = 2;
            this.pan_Bottoms.Dock = DockStyle.Bottom;
            this.pan_Bottoms.Location = new Point(0, 0xfe);
            this.pan_Bottoms.Name = "pan_Bottoms";
            this.pan_Bottoms.Size = new Size(0x246, 10);
            this.pan_Bottoms.TabIndex = 1;
            this.pane_TopT.Dock = DockStyle.Top;
            this.pane_TopT.Location = new Point(0, 0);
            this.pane_TopT.Name = "pane_TopT";
            this.pane_TopT.Size = new Size(0x246, 10);
            this.pane_TopT.TabIndex = 0;
            this.pan_DockBottom.BackColor = Color.FromArgb(0xaf, 0xbf, 190);
            this.pan_DockBottom.Dock = DockStyle.Bottom;
            this.pan_DockBottom.Location = new Point(1, 0x108);
            this.pan_DockBottom.Name = "pan_DockBottom";
            this.pan_DockBottom.Size = new Size(0x246, 1);
            this.pan_DockBottom.TabIndex = 2;
            this.pan_DockRight.BackColor = Color.FromArgb(0xaf, 0xbf, 190);
            this.pan_DockRight.Dock = DockStyle.Right;
            this.pan_DockRight.Location = new Point(0x247, 0);
            this.pan_DockRight.Name = "pan_DockRight";
            this.pan_DockRight.Size = new Size(1, 0x109);
            this.pan_DockRight.TabIndex = 1;
            this.pan_Top.Controls.Add(this.pan_ZhongJian);
            this.pan_Top.Controls.Add(this.pan_TopRight);
            this.pan_Top.Controls.Add(this.pan_TopLeft);
            this.pan_Top.Dock = DockStyle.Top;
            this.pan_Top.Location = new Point(0, 0);
            this.pan_Top.Name = "pan_Top";
            this.pan_Top.Size = new Size(0x248, 0x20);
            this.pan_Top.TabIndex = 4;
            this.pan_ZhongJian.BackgroundImage = Resources.uc_title_2;
            this.pan_ZhongJian.Controls.Add(this.lblTitle);
            this.pan_ZhongJian.Dock = DockStyle.Fill;
            this.pan_ZhongJian.Location = new Point(0x1f, 0);
            this.pan_ZhongJian.Name = "pan_ZhongJian";
            this.pan_ZhongJian.Size = new Size(0x224, 0x20);
            this.pan_ZhongJian.TabIndex = 2;
            this.lblTitle.AutoSize = true;
            this.lblTitle.BackColor = Color.FromArgb(0, 0, 15, 0xff);
            this.lblTitle.Font = new Font("宋体", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0x86);
            this.lblTitle.ForeColor = Color.FromArgb(0x3b, 0x56, 20);
            this.lblTitle.Location = new Point(6, 8);
            this.lblTitle.Name = "lblTitle";
            this.lblTitle.Size = new Size(0x85, 13);
            this.lblTitle.TabIndex = 0;
            this.lblTitle.Text = "意见建议及问题反馈";
            this.pan_TopRight.BackgroundImage = Resources.uc_title_1;
            this.pan_TopRight.Dock = DockStyle.Right;
            this.pan_TopRight.Location = new Point(0x243, 0);
            this.pan_TopRight.Name = "pan_TopRight";
            this.pan_TopRight.Size = new Size(5, 0x20);
            this.pan_TopRight.TabIndex = 1;
            this.pan_TopLeft.BackgroundImage = Resources.uc_title;
            this.pan_TopLeft.Dock = DockStyle.Left;
            this.pan_TopLeft.Location = new Point(0, 0);
            this.pan_TopLeft.Name = "pan_TopLeft";
            this.pan_TopLeft.Size = new Size(0x1f, 0x20);
            this.pan_TopLeft.TabIndex = 0;
            base.AutoScaleDimensions = new SizeF(6f, 12f);
            base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            base.ClientSize = new Size(0x248, 0x129);
            base.Controls.Add(this.pan_Dock);
            base.Controls.Add(this.pan_Top);
            base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            base.MaximizeBox = false;
            base.MinimizeBox = false;
            base.Name = "FrmIdeaAndAdvice";
            base.ShowInTaskbar = false;
            base.Load += new EventHandler(this.FrmIdeaAndAdvice_Load);
            this.pan_Dock.ResumeLayout(false);
            this.pan_AllPanel.ResumeLayout(false);
            this.pan_AllPlanes.ResumeLayout(false);
            this.panel1.ResumeLayout(false);
            this.panel8.ResumeLayout(false);
            this.panel8.PerformLayout();
            this.panel10.ResumeLayout(false);
            this.panel7.ResumeLayout(false);
            this.panel7.PerformLayout();
            this.panel4.ResumeLayout(false);
            this.panel2.ResumeLayout(false);
            this.panel6.ResumeLayout(false);
            this.panel6.PerformLayout();
            this.panel3.ResumeLayout(false);
            this.pan_td3.ResumeLayout(false);
            this.panel5.ResumeLayout(false);
            this.panel5.PerformLayout();
            this.pan_td0.ResumeLayout(false);
            this.panel_BiTian.ResumeLayout(false);
            this.panel_BiTian.PerformLayout();
            this.panel_Button.ResumeLayout(false);
            this.pan_Top.ResumeLayout(false);
            this.pan_ZhongJian.ResumeLayout(false);
            this.pan_ZhongJian.PerformLayout();
            base.ResumeLayout(false);
        }

        [DllImport("kernel32.dll")]
        public static extern int lstrlenA(string InString);
        private void pan_td0_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td0, Color.FromArgb(0xca, 0xc9, 0xce), 1, 0, 1, 1);
        }

        private void pan_td3_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.pan_td3, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void pan_TopLeft_MouseDown(object sender, MouseEventArgs e)
        {
            ReleaseCapture();
            SendMessage(base.Handle, 0x112, 0xf012, 0);
        }

        private void pan_ZhongJian_MouseDown(object sender, MouseEventArgs e)
        {
            ReleaseCapture();
            SendMessage(base.Handle, 0x112, 0xf012, 0);
        }

        private void panel_BiTian_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.panel_BiTian, Color.FromArgb(0xca, 0xc9, 0xce), 1, 1, 1, 1);
        }

        private void Panel_ResetPaint(PaintEventArgs e, Panel panel, Color color, int leftBoder, int topBoder, int rightBoder, int bottomBoder)
        {
            ControlPaint.DrawBorder(e.Graphics, panel.ClientRectangle, color, leftBoder, ButtonBorderStyle.Solid, color, topBoder, ButtonBorderStyle.Solid, color, rightBoder, ButtonBorderStyle.Solid, color, bottomBoder, ButtonBorderStyle.Solid);
        }

        private void panel2_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.panel2, Color.FromArgb(0xca, 0xc9, 0xce), 0, 0, 1, 1);
        }

        private void panel3_Paint(object sender, PaintEventArgs e)
        {
            this.Panel_ResetPaint(e, this.panel3, Color.FromArgb(0xca, 0xc9, 0xce), 1, 0, 1, 1);
        }

        public bool Ping(string ip)
        {
            System.Net.NetworkInformation.Ping ping = new System.Net.NetworkInformation.Ping();
            PingOptions options = new PingOptions {
                DontFragment = true
            };
            string s = "Test Data!";
            byte[] bytes = Encoding.ASCII.GetBytes(s);
            int timeout = 0x3e8;
            return (ping.Send(ip, timeout, bytes, options).Status == IPStatus.Success);
        }

        [DllImport("user32.dll")]
        public static extern bool ReleaseCapture();
        [DllImport("user32.dll")]
        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
        [DllImport("SYUNEW3D.dll")]
        public static extern int YReadEx(byte[] OutData, short Address, short mylen, string HKey, string LKey, string KeyPath);
        [DllImport("SYUNEW3D.dll")]
        public static extern int YReadString(StringBuilder outstring, short Address, short mylen, string HKey, string LKey, string KeyPath);
        [DllImport("SYUNEW3D.dll")]
        public static extern int YWriteEx(byte[] InData, short Address, short mylen, string HKey, string LKey, string KeyPath);
        [DllImport("SYUNEW3D.dll")]
        public static extern int YWriteString(string InString, short Address, string HKey, string LKey, string KeyPath);
    }
}

